<!DOCTYPE>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="css/common.css" />
<link rel="stylesheet" type="text/css" href="css/list.css" />
<link rel="stylesheet" type="text/css" href="css/download.css"/>
<script src="js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
<title>课件下载</title>
</head>
<body>
<a class="item">
  <p class="line1">干部培训中的教学教法</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">《群众工作的望闻问切》答疑</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">领导人的个人素养</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">干部培训中的教学教法</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">干部培训中的教学教法</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">《群众工作的望闻问切》答疑</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">领导人的个人素养</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<a class="item">
  <p class="line1">干部培训中的教学教法</p> <span onclick="downloadFile('https://codeload.github.com/douban/douban-client/legacy.zip/master')">点击下载</span> </a>
<div class="cover_down"></div>
</body>
</html>
<script type="text/javascript">
$('.cover_down').click(function(){
	$(this).removeClass('active');
})
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
var isWeixin = u.toLowerCase().indexOf('micromessenger') != -1; //微信浏览器打开
downloadFile = function (sUrl) {
  if(isiOS) {
    alert('您的设备不支持下载');
    return false;
  }
  //If in Chrome or Safari - download via virtual link click
  if(isAndroid) {
  	if(isWeixin){
  		$('.cover_down').addClass('active');
  		return false;
  	}else{
  		//Creating new link node.
	    var link = document.createElement('a');
	    link.href = sUrl;
	    if(link.download !== undefined) {
	      //Set HTML5 download attribute. This will prevent file from opening if supported.
	      var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);
	      link.download = fileName;
	    }
	    //Dispatching click event.
	    if(document.createEvent) {
	      var e = document.createEvent('MouseEvents');
	      e.initEvent('click', true, true);
	      link.dispatchEvent(e);
	      return true;
	    }
  	}    
  }
  // Force file download (whether supported by server).
  if(sUrl.indexOf('?') === -1) {
    sUrl += '?download';
  }
  window.open(sUrl, '_self');
  return true;
}
window.downloadFile.isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
window.downloadFile.isSafari = navigator.userAgent.toLowerCase().indexOf('safari') > -1;
</script>